import React, { memo, useEffect, useState } from "react"

const App = memo(() => {
    const [count, setCount] = useState(1)
    useEffect(() => {
        console.log("监听redux中数据变化，监听eventBus中的why事件")
        return () => {
            console.log("取消监听redux中数据变化，取消监听eventBus中的why事件")
        }
    })

    return (
        <div>
            <button onClick={(e) => setCount(count + 1)}>+1({count})</button>
        </div>
    )
})

export default App
